package com.zenithmind.disk.feign;

import com.zenithmind.disk.pojo.vo.UsersVO;
import com.zenithmind.common.result.Result;
import com.zenithmind.common.result.ResultCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Fallback implementation for UserFeignClient.
 */
@Component
@Slf4j
public class UserFeignFallbackImpl implements UserFeignClient {

    @Override
    public Result<UsersVO> getUserById(String userId) {
        log.error("UserFeignClient fallback: getUserById called for userId {}. Returning error result.", userId);
        return Result.fail(ResultCode.SERVICE_UNAVAILABLE);
    }

    @Override
    public Result<Void> updateStorageUsed(String userId, long fileSize) {
        log.error("UserFeignClient fallback: updateStorageUsed called for userId {}, fileSize {}. Returning error result.", userId, fileSize);
        return Result.fail(ResultCode.SERVICE_UNAVAILABLE);
    }
} 